package com.wsz.eduservice.client;

import com.wsz.commonutils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient("service-order")
public interface OrderClient {
    @ApiOperation("根据课程Id和用户Id查询订单状态")
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId,
                               @PathVariable("memberId") String memberId);

    @ApiOperation("根据用户Id查询课程Id")
    @GetMapping("/eduorder/order/getBuyCourse/{id}")
    public R getBuyCourse(@PathVariable("id") String id);
}
